﻿<UserControl x:Class="Songhay.Silverlight.BiggestBox.IndexPart.Views.UserControls.PiNumberSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:m="clr-namespace:Songhay.Silverlight.BiggestBox.IndexPart.ViewModels"
    xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    Tag="Silverlight-Enabled WCF Service Sample">
    <UserControl.Resources>
        <m:PiNumberViewModel x:Key="PiNumberViewModelDataSource" d:IsDataSource="True" />
    </UserControl.Resources>
    <UserControl.DataContext>
        <Binding Source="{StaticResource PiNumberViewModelDataSource}" />
    </UserControl.DataContext>
    <toolkit:BusyIndicator IsBusy="{Binding IsMakingServiceCall}">
        <toolkit:DockPanel LastChildFill="True">
            <StackPanel toolkit:DockPanel.Dock="Top"
                Orientation="Horizontal">
                <Button
                    Command="{Binding ClientCommand}"
                    CommandParameter="service-calc-pi"
                    Content="Calculate Pi"
                    Cursor="Hand"
                    />
            </StackPanel>
            <TextBlock toolkit:DockPanel.Dock="Bottom"
                Margin="8"
                Text="{Binding Pi}"
                TextWrapping="Wrap"
                />
        </toolkit:DockPanel>
    </toolkit:BusyIndicator>
</UserControl>
